package com.reconcile.phone.business.domain.bo;

import com.reconcile.phone.common.core.validate.AddGroup;
import com.reconcile.phone.common.core.validate.EditGroup;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 手机号视图业务对象 rp_phone_code
 *
 * Author: liuliyou
 * Date: 2025/8/5
 */
@Data
public class RpPhoneCodeBo {

    /**
     * 主键id
     */
    @NotNull(message = "id不能为空", groups = {EditGroup.class})
    private Long phoneCodeId;
    /**
     * 手机号
     */
    @NotBlank(message = "手机号不能为空", groups = {AddGroup.class, EditGroup.class})
    @Length(min = 1, max = 11, message = "手机号长度范围1~11个字符", groups = {AddGroup.class, EditGroup.class})
    private String phoneNum;
    /**
     * 类型 1：移动 2：联通 3：电信
     */
    @NotBlank(message = "类型不能为空", groups = {AddGroup.class, EditGroup.class})
    private String type;
}
